package jxgcxy.com;

public class Person {
    String name;
    int age;
    double weight;
    String sex;

    public Person() {
    }

    public Person(String name, int age, double weight, String sex) {
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public static class Teacher extends Person{
        String post;

        public Teacher(String name, int age, double weight, String sex, String post) {
            super(name, age, weight, sex);
            this.post = post;
        }
    }

    public static class Student extends Person{
        String school;

        public Student(String name, int age, double weight, String sex, String school) {
            super(name, age, weight, sex);
            this.school = school;
        }
    }

}
